package com.yuju.group.service.impl;

import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuju.common.core.dao.IBaseDao;
import com.yuju.common.core.service.AbstractBaseService;
import com.yuju.group.dao.IGroupDao;
import com.yuju.group.dao.IOrderRelaDao;
import com.yuju.group.dao.entity.Group;
import com.yuju.group.dao.entity.OrderRela;
import com.yuju.group.model.GroupModel;
import com.yuju.group.model.OrderRelaModel;
import com.yuju.group.service.IGroupService;
import com.yuju.group.service.IOrderRelaService;
import com.yuju.util.Utils;
/**
 * 
 * 类名：OrderRelaServiceImpl  <br />
 *
 * 功能：
 *
 * @author : sunyl <br />
 * @Date : 2017年11月24日 上午9:37:25  <br />
 * @version : 1.1 <br />
 */
@Service
public class OrderRelaServiceImpl extends AbstractBaseService<OrderRelaModel,OrderRela,String> implements IOrderRelaService{
	@Autowired
	private IOrderRelaDao orderRelaDao;
	
	@Override
	public IBaseDao<OrderRelaModel, OrderRela, String> getDao() {
		// TODO Auto-generated method stub
		return orderRelaDao;
	}
	@Override
	public int save(OrderRelaModel model) {
		// 保存数据
		model.setId(Utils.getUUID());
		model.setGmtCreate(new Date());
		model.setIsDeleted((byte)2);
		model.setGmtModified(new Date());
		int rows = super.save(model);
		return rows;
	}
	@Override
	public int saveExcepId(OrderRelaModel model) {
		// 保存数据
		model.setGmtCreate(new Date());
		model.setIsDeleted((byte)2);
		model.setGmtModified(new Date());
		int rows = super.save(model);
		return rows;
	}

}
